package com.example.springbott.bean.kerbal;


import com.example.springbott.bean.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class GoodsDetailVo {

    @JsonProperty("specificationList")
    private List<SpecificationListDTO> specificationList;
    @JsonProperty("groupon")
    private List<?> groupon;
    @JsonProperty("issue")
    private List<MarketIssue> issue;
    @JsonProperty("userHasCollect")
    private Integer userHasCollect;
    @JsonProperty("shareImage")
    private String shareImage;
    @JsonProperty("comment")
    private CommentDTO comment;
    @JsonProperty("share")
    private Boolean share;
    @JsonProperty("attribute")
    private List<MarketGoodsAttribute> attribute;
    @JsonProperty("brand")
    private MarketBrand brand;
    @JsonProperty("productList")
    private List<MarketGoodsProduct> productList;
    @JsonProperty("info")
    private MarketGoods info;

    @NoArgsConstructor
    @Data
    public static class CommentDTO {
        @JsonProperty("data")
        private List<MarketComment> data;
        @JsonProperty("count")
        private Integer count;
    }

    @NoArgsConstructor
    @Data
    public static class BrandDTO {
        @JsonProperty("id")
        private Integer id;
        @JsonProperty("name")
        private String name;
        @JsonProperty("desc")
        private String desc;
        @JsonProperty("picUrl")
        private String picUrl;
        @JsonProperty("sortOrder")
        private Integer sortOrder;
        @JsonProperty("floorPrice")
        private Double floorPrice;
        @JsonProperty("addTime")
        private String addTime;
        @JsonProperty("updateTime")
        private String updateTime;
        @JsonProperty("deleted")
        private Boolean deleted;
    }

    @NoArgsConstructor
    @Data
    public static class InfoDTO {
        @JsonProperty("id")
        private Integer id;
        @JsonProperty("goodsSn")
        private String goodsSn;
        @JsonProperty("name")
        private String name;
        @JsonProperty("categoryId")
        private Integer categoryId;
        @JsonProperty("brandId")
        private Integer brandId;
        @JsonProperty("gallery")
        private List<String> gallery;
        @JsonProperty("keywords")
        private String keywords;
        @JsonProperty("brief")
        private String brief;
        @JsonProperty("isOnSale")
        private Boolean isOnSale;
        @JsonProperty("sortOrder")
        private Integer sortOrder;
        @JsonProperty("picUrl")
        private String picUrl;
        @JsonProperty("shareUrl")
        private String shareUrl;
        @JsonProperty("isNew")
        private Boolean isNew;
        @JsonProperty("isHot")
        private Boolean isHot;
        @JsonProperty("unit")
        private String unit;
        @JsonProperty("counterPrice")
        private Integer counterPrice;
        @JsonProperty("retailPrice")
        private Integer retailPrice;
        @JsonProperty("addTime")
        private String addTime;
        @JsonProperty("updateTime")
        private String updateTime;
        @JsonProperty("deleted")
        private Boolean deleted;
        @JsonProperty("detail")
        private String detail;
    }

    @NoArgsConstructor
    @Data
    public static class SpecificationListDTO {
        @JsonProperty("name")
        private String name;
        @JsonProperty("valueList")
        private List<MarketGoodsSpecification> valueList;

        @NoArgsConstructor
        @Data
        public static class ValueListDTO {
            @JsonProperty("id")
            private Integer id;
            @JsonProperty("goodsId")
            private Integer goodsId;
            @JsonProperty("specification")
            private String specification;
            @JsonProperty("value")
            private String value;
            @JsonProperty("picUrl")
            private String picUrl;
            @JsonProperty("addTime")
            private String addTime;
            @JsonProperty("updateTime")
            private String updateTime;
            @JsonProperty("deleted")
            private Boolean deleted;
        }
    }

    @NoArgsConstructor
    @Data
    public static class IssueDTO {
        @JsonProperty("id")
        private Integer id;
        @JsonProperty("question")
        private String question;
        @JsonProperty("answer")
        private String answer;
        @JsonProperty("addTime")
        private String addTime;
        @JsonProperty("updateTime")
        private String updateTime;
        @JsonProperty("deleted")
        private Boolean deleted;
    }

    @NoArgsConstructor
    @Data
    public static class AttributeDTO {
        @JsonProperty("id")
        private Integer id;
        @JsonProperty("goodsId")
        private Integer goodsId;
        @JsonProperty("attribute")
        private String attribute;
        @JsonProperty("value")
        private String value;
        @JsonProperty("addTime")
        private String addTime;
        @JsonProperty("updateTime")
        private String updateTime;
        @JsonProperty("deleted")
        private Boolean deleted;
    }

    @NoArgsConstructor
    @Data
    public static class ProductListDTO {
        @JsonProperty("id")
        private Integer id;
        @JsonProperty("goodsId")
        private Integer goodsId;
        @JsonProperty("specifications")
        private List<String> specifications;
        @JsonProperty("price")
        private Integer price;
        @JsonProperty("number")
        private Integer number;
        @JsonProperty("url")
        private String url;
        @JsonProperty("addTime")
        private String addTime;
        @JsonProperty("updateTime")
        private String updateTime;
        @JsonProperty("deleted")
        private Boolean deleted;
    }
}
